﻿using System;

namespace ShenLan.Common
{
    /// <summary>
    /// Int类型操作类
    /// </summary>
    public class IntHandler
    {
        /// <summary>
        /// 用于int类型的判断是否为Int或者不为空
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static bool IsNotNullOrInt(string id)
        {
            if (string.IsNullOrEmpty(id))
                return false;
            try
            {
                Convert.ToInt32(id.Trim());
                return true;
            }
            catch
            {
                return false;
            }
        }
    }
}